home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
term-source.lha
/
termData.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-02
|
46KB
|
1,612 lines
/*
** termData.c
**
** Global data structures.
**
** Copyright © 1990-1995 by Olaf `Olsen' Barthel
** All Rights Reserved
*/
#include "termGlobal.h"
BOOLEAN DebugFlag;
/* Libraries. */
struct ExecBase *SysBase;
struct DosLibrary *DOSBase;
struct Library *GTLayoutBase;
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct RxsLib *RexxSysBase;
struct LocaleBase *LocaleBase;
struct Library *GadToolsBase,
*TimerBase,
*ConsoleDevice,
*DiskfontBase,
*UtilityBase,
*AslBase,
*IFFParseBase,
*CxBase,
*IconBase,
*LayersBase,
*TranslatorBase,
*WorkbenchBase,
*AmigaGuideBase,
*XEmulatorBase,
*XProtocolBase,
*DataTypesBase,
*OwnDevUnitBase;
BYTE Kick30;
/* Timer device. */
struct timerequest *TimeRequest;
struct MsgPort *TimePort;
/* Console device. */
struct IOStdReq *ConsoleRequest;
struct KeyMap *KeyMap;
BPTR KeySegment;
/* Screen & Windows. */
struct Screen *Screen,
*DefaultPubScreen,
*SharedScreen;
struct Window *Window;
LONG WindowWidth,
WindowHeight,
WindowLeft,
WindowTop;
struct Window *StatusWindow;
struct Gadget *StatusGadget;
UWORD StatusOffset;
struct RastPort StatusRastPort,
*StatusRPort;
UWORD StatusDisplayLeft,
StatusDisplayTop,
StatusDisplayWidth,
StatusDisplayHeight;
APTR OldWindowPtr;
UBYTE __far ScreenTitle[80];
UBYTE DepthMask;
LONG RenderPens[4],
MappedPens[2][32],
SafeTextPen;
struct DrawInfo *DrawInfo;
LONG ScreenWidth,
ScreenHeight;
BYTE UseMasking;
struct IBox WindowBox = { -1,-1,-1,-1 };
struct BlockMarker *WindowMarker;
ULONG ClickSecs,ClickMicros;
BYTE FirstClick = TRUE,HoldClick = FALSE;
LONG ClickX,ClickY;
/* Workbench AppWindow support. */
struct AppWindow *WorkbenchWindow;
struct MsgPort *WorkbenchPort;
/* Graphics rendering. */
struct ViewPort *VPort;
struct RastPort *RPort;
struct Region *ClipRegion,
*OldRegion;
struct TextFont *GFX,
*CurrentFont,
*UserTextFont;
WORD UserFontHeight,
UserFontWidth,
UserFontBase;
UBYTE __far UserFontName[40];
struct TextFont *TextFont;
WORD TextFontHeight,
TextFontWidth,
TextFontBase;
struct TTextAttr TextAttr;
UBYTE __far TextFontName[40];
struct TTextAttr UserFont;
struct TagItem TagDPI[2];
APTR VisualInfo;
UWORD FontRightExtend;
ULONG (* ReadAPen)(struct RastPort *RPort);
ULONG (* ReadBPen)(struct RastPort *RPort);
ULONG (* ReadDrMd)(struct RastPort *RPort);
ULONG (* SetMask)(struct RastPort *RPort,ULONG Mask);
UWORD MonoPens[] =
{
0,1,1,1,1,1,0,0,1, 0,1,1,(UWORD)~0
};
UWORD StandardPens[] =
{
0,1,1,2,1,3,1,0,2, 1,2,1,(UWORD)~0
};
UWORD ANSIPens[] =
{
0,4,7,7,4,6,7,0,6, 0,7,0,(UWORD)~0
};
UWORD EGAPens[] =
{
0,15,15,15,8,7,15,0,7, 0,15,0,(UWORD)~0
};
UWORD NewEGAPens[] =
{
7,0,0,15,0,6,0,7,15, 0,15,0,(UWORD)~0
};
UWORD AtomicColours[16] =
{
0x000,
0xDDD,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000,
0x000
};
UWORD EGAColours[16] =
{
0x000, /* Black. */
0xA00, /* Dark red. */
0x0A0, /* Dark green. */
0xA60, /* Dark yellow (orange). */
0x00A, /* Dark blue. */
0xA0A, /* Dark magenta.*/
0x0AA, /* Dark cyan. */
0xBBB, /* Light grey. */
0x666, /* Dark grey. */
0xF00, /* Red. */
0x0F0, /* Green. */
0xFF0, /* Yellow. */
0x00F, /* Blue. */
0xF0F, /* Magenta. */
0x0FF, /* Cyan. */
0xFFF /* White. */
};
UWORD ANSIColours[16] =
{
0x000, /* Black. */
0xF00, /* Red. */
0x0F0, /* Green. */
0xFF0, /* Yellow. */
0x00F, /* Blue. */
0xF0F, /* Magenta. */
0x0FF, /* Cyan. */
0xFFF, /* White. */
0x000, /* Black. */
0xF00, /* Red. */
0x0F0, /* Green. */
0xFF0, /* Yellow. */
0x00F, /* Blue. */
0xF0F, /* Magenta. */
0x0FF, /* Cyan. */
0xFFF /* White. */
};
UWORD DefaultColours[32],
BlinkColours[32],
NormalColours[32],
StandardColours[32],
PaletteSize = 16;
/* Line/Column offset tables. */
LONG *OffsetXTable,
*OffsetYTable;
/* DOS data. */
struct Process *ThisProcess;
struct Process *StatusProcess;
struct Task *BufferTask;
struct Process *RexxProcess;
struct MsgPort *TermRexxPort;
struct WBStartup *WBenchMsg;
BPTR WBenchLock;
struct TermPort *TermPort;
BYTE CheckBit = -1,
OwnDevBit = -1;
BYTE InRexx;
WORD LimitCount = -1;
UBYTE __far LimitMacro[MAX_FILENAME_LENGTH];
LONG CantQuit;
/* Character conversion. */
struct InputEvent *FakeInputEvent;
/* Serial I/O. */
struct IOExtSer *ReadRequest;
struct IOExtSer *WriteRequest;
struct MsgPort *ReadPort;
APTR ReadBuffer,
HostReadBuffer;
UBYTE *SerialMessage;
ULONG DTERate,
SerialBufferSize;
BYTE ProcessIO = TRUE;
BYTE FirstInvocation;
BYTE UseRTS_CTS;
UBYTE __far NewDevice[MAX_FILENAME_LENGTH];
LONG NewUnit;
BYTE UseNewDevice,
UseNewUnit;
LONG BaudRates[] =
{
110, 300, 600, 1200, 2400, 4800, 7200,
9600, 12000, 14400, 19200, 31250, 38400, 57600,
64000, 76800, 115200, 230400, 345600, 460800, 576000,
614400, 691200, 806400, 921600
};
LONG NumBaudRates = sizeof(BaudRates) / sizeof(LONG);
struct RendezvousSemaphore RendezvousSemaphore;
/* Localization support. */
struct Catalog *Catalog;
struct Locale *Locale;
/* Hotkeys. */
struct Hotkeys Hotkeys;
struct NewBroker NewTermBroker =
{
NB_VERSION,
"term",
"term © 1990-1994 by Olaf Barthel",
"Terminal program",
0,0,0,NULL,0
};
/* Static default fonts. */
struct TextAttr DefaultFont =
{
(UBYTE *)"topaz.font",
8,
FS_NORMAL,
FPF_ROMFONT | FPF_DESIGNED
};
struct TextAttr GFXFont =
{
(UBYTE *)"GFX.font",
8,
FS_NORMAL,
FPF_DISKFONT
};
/* Character lookup tables. */
BYTE IsPrintable[256] =
{
0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,
0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
};
BYTE IsGlyph[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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0x00,0x1B,0x00,0x00,0x00,0x00,
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xAD,0x9B,0x9C,0x00,0x9D,0x00,0x15,0x00,0x00,0xA6,0x00,0x00,0x00,0xAE,0x00,
0xF8,0xF1,0xFD,0x00,0x00,0xE6,0x14,0xF9,0x00,0x00,0xA7,0xAF,0xAC,0xAB,0x00,0xA8,
0x00,0x00,0x00,0x00,0x8E,0x8F,0x92,0x80,0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xA5,0x00,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x00,0x00,0x9A,0x00,0x00,0xE1,
0x85,0xA0,0x83,0x00,0x84,0x86,0x91,0x87,0x8A,0x82,0x88,0x89,0x8D,0xA1,0x8C,0x00,
0x00,0xA4,0x95,0xA2,0x93,0x00,0x94,0x00,0x00,0x97,0xA3,0x96,0x81,0x00,0x00,0x98
};
/* IBM -> ISO font conversion. */
UBYTE __far ISOConversion[256] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x00,0x00,
0x00,0x11,0x00,0x13,0xB6,0xA7,0x00,0x00,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x00,
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
0xC7,0xFC,0xE9,0xE2,0xE4,0xE0,0xE5,0xE7,0xEA,0xEB,0xE8,0x00,0xEE,0xEC,0xC4,0xC5,
0xC9,0xE6,0xC6,0xF4,0xF6,0xF2,0xFB,0xF9,0xFF,0xD6,0xDC,0xA2,0xA3,0xA5,0x00,0x00,
0xE1,0xED,0xF3,0xFA,0xF1,0xD1,0xAA,0xBA,0xBF,0x00,0x00,0xBD,0xBC,0xA1,0xAE,0xBB,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xDF,0x00,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xB1,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0xB7,0x00,0x00,0x00,0xB2,0x00,0x00
};
/* Table of graphics characters. */
BYTE GfxTable[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
/* Special character treatment. */
struct SpecialKey SpecialKeys[13] =
{
BEL, DoBeep, /* Ring the bell. */
XON, DoxON, /* Flow control - stop output. */
BKS, DoBackspace, /* Erase a character. */
ENT, DoLF_FF_VT, /* Enter key. */
FFD, DoFF, /* Form feed. */
VTB, DoLF_FF_VT, /* Vertical tab (huh?). */
RET, DoCR, /* Return key. */
TAB, DoTab, /* Move to next tab stop. */
SI, DoShiftIn, /* Change to graphics mode */
SO, DoShiftOut, /* Change out of graphics mode. */
ENQ, DoEnq, /* Transmit answerback message. */
ESC, DoEsc, /* Start new control sequence. */
CSI, DoCsi /* Start new control sequence. */
};
JUMP *SpecialTable;
BYTE AbortMap[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
JUMP *AbortTable;
VOID (* ConDump)(STRPTR,LONG);
VOID (* ConOutput)(STRPTR,LONG);
VOID (* ConProcessData)(register STRPTR,register LONG);
/* Shared global string formatting buffer. */
UBYTE __far SharedBuffer[512];
/* Some more handy buffers. */
UBYTE __far ARexxCommandBuffer[256],AmigaDOSCommandBuffer[256],DialNumberBuffer[256];
/* Screen pull-down-menu. */
struct NewMenu TermMenu[] =
{
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)0},
{ NM_SUB, NULL, 0 , 0, 0, (APTR)MEN_SAVE_AS_PICTURE},
{ NM_SUB, NULL, 0 , 0, 0, (APTR)MEN_SAVE_AS_TEXT},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)0},
{ NM_SUB, NULL, 0 , 0, 0, (APTR)MEN_PRINT_SCREEN},
{ NM_SUB, NULL, 0 , 0, 0, (APTR)MEN_PRINT_SCREEN_AS_GFX},
{ NM_SUB, NULL, 0 , 0, 0, (APTR)MEN_PRINT_CLIP},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)0},
{ NM_SUB, NULL, 0 , TICK, 0, (APTR)MEN_CAPTURE_TO_FILE},
{ NM_SUB, NULL, 0 , TICK, 0, (APTR)MEN_CAPTURE_TO_PRINTER},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_ICONIFY},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_ABOUT},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_QUIT},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_COPY},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_PASTE},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CLEAR},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_EXECUTE_DOS_COMMAND},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_EXECUTE_REXX_COMMAND},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_RECORD},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_RECORD_LINE},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_EDIT_TRAPS},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_DISABLE_TRAPS},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_PHONEBOOK},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_REDIAL},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_DIAL_NUMBER},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SEND_BREAK},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_HANG_UP},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_WAIT},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_FLUSH_BUFFER},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_RELEASE_DEVICE},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_UPLOAD_ASCII},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_DOWNLOAD_ASCII},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_UPLOAD_TEXT},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_DOWNLOAD_TEXT},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_EDIT_AND_UPLOAD_TEXT},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_UPLOAD_BINARY},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_DOWNLOAD_BINARY},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CLEAR_BUFFER},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_DISPLAY_BUFFER},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CLOSE_BUFFER},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_FREEZE_BUFFER},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_OPEN_BUFFER},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SAVE_BUFFER_AS},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CLEAR_SCREEN},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_RESET_FONT},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_RESET_STYLES},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_RESET_TERMINAL},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SERIAL},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_MODEM},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SCREEN},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_TERMINAL},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SET_EMULATION},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CLIPBOARD},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CAPTURE},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_COMMANDS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_MISC},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_PATH},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_TRANSFER_PROTOCOL},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_TRANSFER},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_TRANSLATION},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_MACROS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_CURSORKEYS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_FAST_MACROS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_HOTKEYS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SPEECH},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SOUND},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_RATES},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SET_CONSOLE},
{ NM_ITEM, NM_BARLABEL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_OPEN_SETTINGS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SAVE_SETTINGS},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_SAVE_SETTINGS_AS},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)0},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_STATUS_WINDOW},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_REVIEW_WINDOW},
{ NM_ITEM, NULL, 0 , CHECKIT, 0, (APTR)MEN_PACKET_WINDOW},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_CHAT_LINE},
{ NM_ITEM, NULL, 0 , TICK, 0, (APTR)MEN_FAST_MACROS_WINDOW},
{ NM_ITEM, NULL, 0 , 0, 0, (APTR)MEN_UPLOAD_QUEUE_WINDOW},
{ NM_TITLE, NULL, 0 , 0, 0, (APTR)MEN_EXTRA_DIAL},
{ NM_END, 0, 0 , 0, 0, (APTR)0}
};
struct Menu *Menu;
struct Image *AmigaGlyph,
*CheckGlyph;
LONG MenuLabels[] =
{
MSG_TERMDATA_PROJECT_MEN,
MSG_TERMDATA_SAVE_SCREEN_AS_MEN,
MSG_TERMDATA_SAVE_AS_PICTURE_MEN,
MSG_TERMDATA_SAVE_AS_TEXT_MEN,
MSG_TERMDATA_PRINT_MEN,
MSG_TERMDATA_PRINT_SCREEN_MEN,
MSG_TERMDATA_PRINT_SCREEN_GFX_MEN,
MSG_TERMDATA_PRINT_CLIP_MEN,
MSG_TERMDATA_CAPTURE_MEN,
MSG_TERMDATA_CAPTURE_TO_FILE_MEN,
MSG_TERMDATA_CAPTURE_TO_PRINTER_MEN,
MSG_TERMDATA_ICONIFY_MEN,
MSG_TERMDATA_ABOUT_MEN,
MSG_TERMDATA_QUIT_MEN,
MSG_TERMDATA_EDIT_MEN,
MSG_TERMDATA_COPY_MEN,
MSG_TERMDATA_PASTE_MEN,
MSG_TERMDATA_CLEAR_MEN,
MSG_TERMDATA_COMMANDS_MEN,
MSG_TERMDATA_EXECUTE_DOS_COMMAND_MEN,
MSG_TERMDATA_EXECUTE_REXX_COMMAND_MEN,
MSG_TERMDATA_RECORD_MEN,
MSG_TERMDATA_RECORD_LINE_MEN,
MSG_TERMDATA_EDIT_TRAPS_MEN,
MSG_TERMDATA_DISABLE_TRAPS_MEN,
MSG_TERMDATA_PHONE_MEN,
MSG_TERMDATA_PHONEBOOK_MEN,
MSG_TERMDATA_REDIAL_MEN,
MSG_TERMDATA_DIAL_NUMBER_MEN,
MSG_TERMDATA_SEND_BREAK_MEN,
MSG_TERMDATA_HANG_UP_MEN,
MSG_TERMDATA_WAIT_MEN,
MSG_TERMDATA_FLUSH_BUFFER_MEN,
MSG_TERMDATA_RELEASE_DEVICE_MEN,
MSG_TERMDATA_XFER_MEN,
MSG_TERMDATA_UPLOAD_ASCII_MEN,
MSG_TERMDATA_DOWNLOAD_ASCII_MEN,
MSG_TERMDATA_UPLOAD_TEXT_MEN,
MSG_TERMDATA_DOWNLOAD_TEXT_MEN,
MSG_TERMDATA_EDIT_AND_UPLOAD_TEXT_MEN,
MSG_TERMDATA_UPLOAD_BINARY_MEN,
MSG_TERMDATA_DOWNLOAD_BINARY_MEN,
MSG_TERMDATA_BUFFER_MEN,
MSG_TERMDATA_CLEAR_BUFFER_MEN,
MSG_TERMDATA_DISPLAY_BUFFER_MEN,
MSG_TERMDATA_CLOSE_BUFFER_MEN,
MSG_TERMDATA_FREEZE_BUFFER_MEN,
MSG_TERMDATA_OPEN_BUFFER_MEN,
MSG_TERMDATA_SAVE_BUFFER_AS_MEN,
MSG_TERMDATA_SCREEN_MEN,
MSG_TERMDATA_CLEAR_SCREEN_MEN,
MSG_TERMDATA_RESET_FONT_MEN,
MSG_TERMDATA_RESET_STYLES_MEN,
MSG_TERMDATA_RESET_TERMINAL_MEN,
MSG_TERMDATA_SETTINGS_MEN,
MSG_TERMDATA_SERIAL_MEN,
MSG_TERMDATA_MODEM_MEN,
MSG_TERMDATA_SCREEN_PREFS_MEN,
MSG_TERMDATA_TERMINAL_MEN,
MSG_TERMDATA_SET_EMULATION_MEN,
MSG_TERMDATA_CLIPBOARD_PREFS_MEN,
MSG_TERMDATA_CAPTURE_PREFS_MEN,
MSG_TERMDATA_COMMANDS_PREFS_MEN,
MSG_TERMDATA_MISC_MEN,
MSG_TERMDATA_PATH_MEN,
MSG_TERMDATA_TRANSFER_PROTOCOL_MEN,
MSG_TERMDATA_TRANSFER_MEN,
MSG_TERMDATA_TRANSLATION_MEN,
MSG_TERMDATA_MACROS_MEN,
MSG_TERMDATA_CURSORKEYS_MEN,
MSG_TERMDATA_FAST_MACROS_MEN,
MSG_TERMDATA_HOTKEYS_MEN,
MSG_TERMDATA_SPEECH_MEN,
MSG_TERMDATA_SOUND_MEN,
MSG_AREACODES_MEN,
MSG_TERMDATA_SET_CONSOLE_MEN,
MSG_TERMDATA_OPEN_SETTINGS_MEN,
MSG_TERMDATA_SAVE_SETTINGS_MEN,
MSG_TERMDATA_SAVE_SETTINGS_AS_MEN,
MSG_TERMDATA_WINDOWS_MEN,
MSG_TERMDATA_STATUS_WINDOW_MEN,
MSG_TERMDATA_REVIEW_WINDOW_MEN,
MSG_TERMDATA_PACKET_WINDOW_MEN,
MSG_TERMDATA_CHAT_LINE_MEN,
MSG_TERMDATA_FAST_MACROS_WINDOW_MEN,
MSG_TERMDATA_UPLOAD_QUEUE_WINDOW_MEN,
MSG_TERMDATA_DIALING_MEN
};
/* Pointer. */
UWORD __chip Stopwatch[(1 + 16 + 1) * 2] =
{
0x0000,0x0000,
0x0400,0x07C0,
0x0000,0x07C0,
0x0100,0x0380,
0x0000,0x07E0,
0x07C0,0x1FF8,
0x1FF0,0x3FEC,
0x3FF8,0x7FDE,
0x3FF8,0x7FBE,
0x7FFC,0xFF7F,
0x7EFC,0xFFFF,
0x7FFC,0xFFFF,
0x3FF8,0x7FFE,
0x3FF8,0x7FFE,
0x1FF0,0x3FFC,
0x07C0,0x1FF8,
0x0000,0x07E0,
0x0000,0x0000
};
/* Cross-hatch pattern. */
ULONG __chip Crosshatch = 0x5555AAAA;
/* Ghosting pattern, slightly different from the cross-hatch pattern. */
ULONG __chip Ghosting = 0x44441111;
/* Configuration. */
struct Configuration *Config,
*PrivateConfig,
*BackupConfig;
struct SpeechConfig SpeechConfig;
BYTE English = TRUE;
BYTE Status;
BYTE Online,WasOnline;
ULONG OnlineMinutes,OnlinePlus;
UWORD PublicModes;
struct SignalSemaphore OnlineSemaphore;
UBYTE __far LastConfig[MAX_FILENAME_LENGTH];
UBYTE __far DefaultPubScreenName[MAXPUBSCREENNAME + 1],
SomePubScreenName[MAXPUBSCREENNAME + 1];
/* Capture file. */
struct Buffer *FileCapture;
BPTR PrinterCapture;
UBYTE __far CaptureName[MAX_FILENAME_LENGTH];
BYTE StandardPrinterCapture,
ControllerActive;
LONG BufferFlushCount;
VOID (* __regargs CaptureData)(register APTR Data,register LONG Size);
/* Buffer. */
UBYTE **BufferLines;
LONG Lines;
struct SignalSemaphore *BufferSemaphore,
BufferTaskSemaphore;
LONG MaxLines = 100;
LONG BufferSpace;
BYTE BufferClosed;
BYTE BufferFrozen;
struct MinList ReviewBufferHistory,
TextBufferHistory;
/* Sound support.c */
struct SoundConfig SoundConfig;
BYTE SoundChanged = FALSE;
/* Phonebook. */
struct PhoneEntry **Phonebook;
LONG PhoneSize;
LONG NumPhoneEntries;
UBYTE __far PhonePassword[256];
BYTE PhonePasswordUsed,
RebuildMenu;
UBYTE __far Password[100];
UBYTE __far UserName[100];
UBYTE __far GlobalPassword[256];
UBYTE __far CurrentBBSName[40],
CurrentBBSNumber[100],
CurrentBBSComment[100];
UBYTE __far LastPhone[MAX_FILENAME_LENGTH];
UBYTE __far LastKeys[MAX_FILENAME_LENGTH];
UBYTE __far LastMacros[MAX_FILENAME_LENGTH];
UBYTE __far LastCursorKeys[MAX_FILENAME_LENGTH];
UBYTE __far LastTranslation[MAX_FILENAME_LENGTH];
UBYTE __far LastSpeech[MAX_FILENAME_LENGTH];
UBYTE __far LastSound[MAX_FILENAME_LENGTH];
struct MacroKeys *MacroKeys;
struct CursorKeys *CursorKeys;
/* Console stuff. */
UBYTE *StripBuffer;
UWORD LastLine,LastColumn,LastPixel;
UWORD LastPrintableColumn;
UWORD LastPrintablePixel;
UWORD CharCellNominator,CharCellDenominator;
UBYTE CurrentFontScale,FontScalingRequired,CurrentCharWidth;
UBYTE Charset,Attributes,FgPen,BgPen;
WORD CursorX,CursorY,Top,Bottom;
BYTE UseRegion,RegionSet,InSequence,Quiet,Blocking;
BYTE *TabStops;
UWORD TabStopMax;
BYTE CharMode[2];
BYTE ResetDisplay,
DisplayReopened,
FixPubScreenMode,
FixScreenSize,
Apocalypse;
struct SignalSemaphore TerminalSemaphore; // Protection from shape changers
/* Flow filter. */
STRPTR AttentionBuffers[SCAN_COUNT];
BYTE BaudPending,FullCheck,UseFlow;
UBYTE BaudBuffer[80],BaudCount;
struct FlowInfo FlowInfo;
STRPTR DataHold;
LONG DataSize;
/* Transfer data. */
BYTE BinaryTransfer;
LONG TransferAbortState;
WORD TransferAbortCount;
LONG TransferBits;
VOID (* ConTransfer)(STRPTR,LONG);
UBYTE *DownloadPath;
BYTE Uploading;
BYTE DidTransfer;
struct Window *TransferWindow,
*TransferPerfWindow;
UBYTE __far TransferTitleBuffer[256];
BOOLEAN TransferZoomed = FALSE;
STRPTR TransferWindowTitle;
struct LayoutHandle *TransferHandle;
struct Menu *TransferMenu;
struct Gadget *TransferGadgetArray[GAD_TRANSFER_SKIP + 1];
struct List TransferInfoList;
struct FileTransferInfo *FileTransferInfo;
struct XPR_IO *XprIO;
UBYTE __far ProtocolOptsBuffer[256];
BYTE NewLibrary,NewOptions;
BOOLEAN XPRCommandSelected;
UBYTE __far LastXprLibrary[MAX_FILENAME_LENGTH];
UBYTE __far TransferProtocolName[40];
UBYTE __far ConvNumber[30],ConvNumber10[30];
BYTE UsesZModem,SendAbort,TransferAborted,TransferFailed,TransferError;
/* The standard ZModem cancel sequence
* (ten CAN chars followed by ten
* BS chars).
*/
UBYTE ZModemCancel[] =
{
24,24,24,24,24,24,24,24,24,24,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8
};
/* Pay per minute. */
LONG CurrentPay;
LONG PayPerUnit[2];
LONG SecPerUnit[2];
LONG WhichUnit;
struct PhoneEntry *ChosenEntry;
BYTE ChosenInUse;
struct List *PatternList,
*ChosenPattern;
UBYTE __far LastPattern[MAX_FILENAME_LENGTH];
BYTE PatternsChanged;
struct SignalSemaphore PatternSemaphore;
/* Execute a command/script. */
UBYTE __far WindowName[256];
ULONG BlockNestCount;
BYTE WeAreBlocking;
/* Dial list. */
struct List *DialList;
BYTE SendStartup;
LONG FirstDialMenu = -1;
struct RexxMsg *DialMsg;
/* TermMain data. */
BYTE ReleaseSerial;
BYTE ResetSerial;
BYTE MainTerminated,
IconTerminated = TRUE,
DoIconify = FALSE,
DoDial = DIAL_IGNORE,
KeepQuiet;
BYTE ConfigChanged,PhonebookChanged,TranslationChanged,
MacroChanged,CursorKeysChanged,FastMacrosChanged,
HotkeysChanged,SpeechChanged,BufferChanged;
/* Upload/Download paths. */
UBYTE __far LastDownload[MAX_FILENAME_LENGTH];
UBYTE __far LastUpload[MAX_FILENAME_LENGTH];
/* String gadget hooks. */
struct Window *CommandWindow;
struct Gadget *CommandGadget;
BYTE ClipInput,
ClipXerox,
ClipPrefix;
/* Text sending. */
UBYTE __far SendPrompt[256];
LONG SendPromptLen;
BYTE (* SendLine)(register STRPTR,register LONG);
/* Packet window. */
struct Window *PacketWindow;
struct Gadget *PacketGadgetArray[2];
struct Menu *PacketMenu;
struct Gadget *PacketGadgetList;
struct List PacketHistoryList;
/* Some more colour control flags. */
BYTE Initializing,LoadColours;
/* The character raster. */
UBYTE *Raster,*RasterAttr;
LONG RasterWidth,RasterHeight;
BYTE Marking;
struct SignalSemaphore *RasterSemaphore;
BYTE RasterEnabled = TRUE;
/* Generic lists. */
struct GenericList *GenericListTable[GLIST_COUNT];
/* File version test. */
ULONG VersionProps[2] =
{
ID_TERM,
ID_VERS
};
/* Window stack. */
struct Window *TopWindow;
struct Window *WindowStack[5];
WORD WindowStackPtr;
/* Global term ID. */
LONG TermID;
UBYTE __far TermIDString[MAXPUBSCREENNAME + 1];
UBYTE __far RexxPortName[256];
/* Fast! macros. */
struct List FastMacroList;
LONG FastMacroCount;
UBYTE __far LastFastMacros[MAX_FILENAME_LENGTH];
struct Window *FastWindow;
WORD FastWindowLeft = -1,
FastWindowTop = -1,
FastWindowHeight = -1;
/* Double-buffered file locking. */
struct List DoubleBufferList;
struct SignalSemaphore DoubleBufferSemaphore;
/* XEM interface. */
struct XEM_IO *XEM_IO;
ULONG XEM_Signal;
struct XEmulatorHostData XEM_HostData;
UBYTE *OptionTitle;
struct List XEM_MacroList;
struct XEmulatorMacroKey *XEM_MacroKeys;
UBYTE __far EmulationName[40];
struct List EmptyList;
/* Screen scrolling support. */
UWORD ScrollLineFirst,ScrollLineLast,
ScrollLineCount;
struct ScrollLineInfo *ScrollLines;
/* term review buffer. */
struct Window *ReviewWindow;
/* Background information. */
ULONG BytesIn,
BytesOut;
struct DateStamp SessionStart;
struct Window *InfoWindow;
/* Gadget support routines */
LONG InterWidth,
InterHeight;
/* Character translation. */
struct TranslationEntry **SendTable,
**ReceiveTable;
/* Window alignment information. */
struct WindowInfo WindowInfoTable[WINDOW_COUNT] =
{
WINDOW_PACKET, WC_ALIGNBELOW|WC_EXPANDWIDTH, 0,0,0,0,
WINDOW_STATUS, WC_ALIGNRIGHT, 0,0,0,0,
WINDOW_FILE, NULL, 0,0,0,0,
WINDOW_REVIEW, WC_ALIGNTOP|WC_EXPANDWIDTH, 0,0,0,0,
WINDOW_FAST, WC_ALIGNTOP|WC_ALIGNSIDE, 0,0,0,0,
WINDOW_FONT, NULL, 0,0,0,0,
WINDOW_SCREEN, NULL, 0,0,0,0,
WINDOW_PERF, NULL, 0,0,0,0,
WINDOW_MAIN, NULL, -1,-1,0,0
};
/* New user interface. */
extern ULONG HookEntry();
struct Hook LocaleHook =
{
{NULL},
(HOOKFUNC)HookEntry,
(HOOKFUNC)LocaleHookFunc
};
/* AmigaGuide hook. */
struct Hook GuideHook =
{
{NULL},
(HOOKFUNC)GuideSetupHook
};
/* Special queue management. */
struct MsgQueue *SpecialQueue;
/* Phonebook edit list support. */
STRPTR *EditLabels;
struct List *EditList;
struct Node *EditNode;
/* Window and Screen backfill hook. */
struct Hook BackfillHook =
{
{NULL},
(HOOKFUNC)BackfillRoutine
};
/* Intercept data going through SerWrite. */
BOOLEAN (*SerWriteBypass)(STRPTR Buffer,LONG Size);
/* The incredibly shrinking file name. */
UBYTE __far ShrunkenName[MAX_FILENAME_LENGTH],
OriginalName[MAX_FILENAME_LENGTH];
/* Terminal emulation task. */
struct MsgQueue *TerminalQueue;
/* DNet/ParaBIT support. */
/*
struct DChannel *NetChannel;
struct MsgPort *NetListen;
ULONG NetSigMask;
BOOLEAN NetTerminated;
*/
/* AppIcon data. */
STATIC UWORD DropData[304] =
{
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x2000,0x1000,0x0000,0x0000,0xF000,0x1000,
0x0000,0x0001,0x9800,0x1000,0x0000,0x0003,0x1C3E,0x1000,
0x0000,0x0003,0xFC30,0x1000,0x0000,0x0000,0x01FF,0x1000,
0x0000,0x0000,0x01FC,0x1000,0x0000,0x0060,0x0000,0x1000,
0x0000,0x001F,0xFFFF,0xF000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0700,0x0000,
0x07FF,0xFFFE,0x0700,0x0000,0x07FF,0xFFEE,0x0700,0x0000,
0x0755,0x555E,0x0700,0x0000,0x07AA,0xAAAE,0x1FC0,0x0000,
0x0755,0x555E,0x0F80,0x0000,0x07AA,0xAAAE,0x0700,0x0000,
0x0755,0x555E,0x0200,0x0000,0x07AA,0xAAAE,0x0000,0x0000,
0x0755,0x555E,0x0000,0x0000,0x07FF,0xFFFE,0x0000,0x0000,
0x07FF,0xFFFE,0x0000,0x0000,0x07FF,0xFFFC,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7FFF,0xFFFF,0xE000,0x0000,
0x7FFF,0xFEFF,0xE000,0x0000,0x7FFF,0xFEF0,0x0000,0x0000,
0x7FE5,0x54E7,0xFF80,0x0000,0x7FFF,0xFF8E,0x0FC0,0x0000,
0x7FFF,0xFFBD,0xFCF0,0x0000,0x0FFF,0xFFFF,0xFEE0,0x0000,
0x0FFF,0xFFFB,0xD700,0x0000,0x0000,0x0007,0xAF80,0x0000,
0x0000,0x000F,0xFF80,0x0000,0x0000,0x0007,0xFF00,0x0000,
0x0000,0x007F,0xFFFE,0x0000,0x0000,0x007F,0xFFFF,0x8000,
0x0000,0x0060,0x20FF,0xE000,0x0000,0x0060,0xF0FF,0xE000,
0x0000,0x0061,0x98FF,0xE000,0x0000,0x0063,0x1CBF,0xE000,
0x0000,0x0063,0xFCB7,0xE000,0x0000,0x007F,0xFDFF,0xE000,
0x0000,0x007F,0xFDFF,0xE000,0x0000,0x007F,0xFFFF,0xE000,
0x0000,0x001F,0xFFFF,0xE000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x07FF,0xFFFC,0x0000,0x0000,
0x0FFF,0xFFFC,0x0000,0x0000,0x0EAA,0xAABC,0x0000,0x0000,
0x0F55,0x555C,0x0000,0x0000,0x0EAA,0xAABC,0x0000,0x0000,
0x0F55,0x555C,0x0000,0x0000,0x0EAA,0xAABC,0x0000,0x0000,
0x0F55,0x555C,0x0000,0x0000,0x0EAA,0xAABC,0x0000,0x0000,
0x0FFF,0xFFFC,0x0000,0x0000,0x0FFF,0xFFFC,0x0000,0x0000,
0x0FFF,0xFFFC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x7FFF,0xFFFF,0xC000,0x0000,0xFFFF,0xFFFF,0xC000,0x0000,
0xFFEA,0xABFF,0xC000,0x0000,0xFFE0,0x03FF,0xFF00,0x0000,
0xFFFF,0xFFFF,0xFFC0,0x0000,0xFFFF,0xFFFF,0xF9E0,0x0000,
0x0000,0x007F,0xFDE0,0x0000,0x1FFF,0xFFC7,0xAF00,0x0000,
0x0000,0x0007,0x5F00,0x0000,0x0000,0x000F,0xFF80,0x0000,
0x0000,0x001F,0xFF00,0x0000,0x0000,0x0000,0x0000,0x0000
};
STATIC struct Image DropImage =
{
0,0,
52,38,2,
DropData,
0x03,0x00,
NULL
};
struct DiskObject DropIcon =
{
WB_DISKMAGIC,
WB_DISKVERSION,
NULL,
175,18,
52,39,
0x0005,
0x0003,
0x0001,
&DropImage,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
WBTOOL,
NULL,
NULL,
NO_ICON_POSITION,
NO_ICON_POSITION,
NULL,
NULL,
8192
};
/* Remember some of the incoming data. */
BOOL RememberOutput,
RememberInput,
Recording,
RecordingLine;
/* Trap settings. */
BOOLEAN WatchTraps;
BOOLEAN TrapsChanged;
UBYTE LastTraps[MAX_FILENAME_LENGTH];
/* CR/LF receiver translation data. */
LONG (* __regargs Translate_CR_LF)(register STRPTR Data,register LONG Size);
/* End of line conversion labels. */
STRPTR EOL_Labels[] =
{
"-",
"«CR»",
"«LF»",
"«CR»«LF»",
"«LF»«CR»",
NULL
};
/**********************************************************************/
/* Character access tables. */
STATIC UBYTE __far Table0[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
STATIC UBYTE __far Table1[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
/* This follows the control code information. */
struct ControlCode ANSICode[] =
{
/* Single Character Sequences. */
'D', Table0, NULL, 0 , 1, (EPTR)CursorScrollDown, // IND
'M', Table0, NULL, 0 , 1, (EPTR)CursorScrollUp, // RI
'E', Table0, NULL, 0 , 1, (EPTR)NextLine, // NEL
'7', Table0, NULL, 0 , 1, (EPTR)SaveCursor, // DECSC
'8', Table0, NULL, 0 , 1, (EPTR)LoadCursor, // DECRC
'=', Table0, NULL, 0 , 1, (EPTR)NumericAppMode, // DECPAM
'>', Table0, NULL, 0 , 1, (EPTR)NumericAppMode, // DECPNM
'N', Table0, NULL, 0 , 1, (EPTR)Ignore, // SS2
'O', Table0, NULL, 0 , 1, (EPTR)Ignore, // SS3
'H', Table0, NULL, 0 , 1, (EPTR)SetTab, // HTS
'P', Table0, NULL, 0 , 1, (EPTR)Ignore, // DCS
'/', Table0, NULL, 0 , 1, (EPTR)Ignore, // ST
'Z', Table0, NULL, 0 , 1, (EPTR)RequestTerminal, // DECID
'c', Table0, NULL, 0 , 1, (EPTR)Reset, // RIS
'<', Table0, NULL, 0 , 1, (EPTR)Ignore, // VT52 "Enter ANSI mode"
'~', Table0, NULL, 0 , 1, (EPTR)Ignore, // LS1R
'n', Table0, NULL, 0 , 1, (EPTR)Ignore, // LS2
0x7D, Table0, NULL, 0 , 1, (EPTR)Ignore, // LS2R
'o', Table0, NULL, 0 , 1, (EPTR)Ignore, // LS3
'|', Table0, NULL, 0 , 1, (EPTR)Ignore, // LS3R
/* Double Character Sequences. */
'[', Table0, NULL, 's', 2, (EPTR)SaveCursor,
'[', Table0, NULL, 'u', 2, (EPTR)LoadCursor,
'(', Table0, NULL, 'A', 2, (EPTR)FontStuff, // SCS
'(', Table0, NULL, 'B', 2, (EPTR)FontStuff, // ASCII font
'(', Table0, NULL, '0', 2, (EPTR)FontStuff, // DEC special graphics font
'(', Table0, NULL, '<', 2, (EPTR)Ignore, // DEC supplemental font
'(', Table0, NULL, '4', 2, (EPTR)Ignore, // Dutch font
'(', Table0, NULL, '5', 2, (EPTR)Ignore, // Finnish font
'(', Table0, NULL, 'C', 2, (EPTR)Ignore, // Finnish font
'(', Table0, NULL, 'R', 2, (EPTR)Ignore, // French font
'(', Table0, NULL, 'Q', 2, (EPTR)Ignore, // French Canadian font
'(', Table0, NULL, 'K', 2, (EPTR)Ignore, // German font
'(', Table0, NULL, 'Y', 2, (EPTR)Ignore, // Italian font
'(', Table0, NULL, '6', 2, (EPTR)Ignore, // Norwegian/Danish font
'(', Table0, NULL, 'E', 2, (EPTR)Ignore, // Norwegian/Danish font
'(', Table0, NULL, 'Z', 2, (EPTR)Ignore, // Spanish font
'(', Table0, NULL, '7', 2, (EPTR)Ignore, // Swedish font
'(', Table0, NULL, 'H', 2, (EPTR)Ignore, // Swedish font
'(', Table0, NULL, '=', 2, (EPTR)Ignore, // Swiss font
')', Table0, NULL, 'A', 2, (EPTR)FontStuff, // SCS
')', Table0, NULL, 'B', 2, (EPTR)FontStuff, // ASCII font
')', Table0, NULL, '0', 2, (EPTR)FontStuff, // DEC special graphics font
')', Table0, NULL, '<', 2, (EPTR)Ignore, // DEC supplemental font
')', Table0, NULL, '4', 2, (EPTR)Ignore, // Dutch font
')', Table0, NULL, '5', 2, (EPTR)Ignore, // Finnish font
')', Table0, NULL, 'C', 2, (EPTR)Ignore, // Finnish font
')', Table0, NULL, 'R', 2, (EPTR)Ignore, // French font
')', Table0, NULL, 'Q', 2, (EPTR)Ignore, // French Canadian font
')', Table0, NULL, 'K', 2, (EPTR)Ignore, // German font
')', Table0, NULL, 'Y', 2, (EPTR)Ignore, // Italian font
')', Table0, NULL, '6', 2, (EPTR)Ignore, // Norwegian/Danish font
')', Table0, NULL, 'E', 2, (EPTR)Ignore, // Norwegian/Danish font
')', Table0, NULL, 'Z', 2, (EPTR)Ignore, // Spanish font
')', Table0, NULL, '7', 2, (EPTR)Ignore, // Swedish font
')', Table0, NULL, 'H', 2, (EPTR)Ignore, // Swedish font
')', Table0, NULL, '=', 2, (EPTR)Ignore, // Swiss font
'+', Table0, NULL, 'A', 2, (EPTR)Ignore, // British font
'+', Table0, NULL, 'B', 2, (EPTR)Ignore, // ASCII font
'+', Table0, NULL, '0', 2, (EPTR)Ignore, // DEC special graphics font
'+', Table0, NULL, '<', 2, (EPTR)Ignore, // DEC supplemental font
'+', Table0, NULL, '4', 2, (EPTR)Ignore, // Dutch font
'+', Table0, NULL, '5', 2, (EPTR)Ignore, // Finnish font
'+', Table0, NULL, 'C', 2, (EPTR)Ignore, // Finnish font
'+', Table0, NULL, 'R', 2, (EPTR)Ignore, // French font
'+', Table0, NULL, 'Q', 2, (EPTR)Ignore, // French Canadian font
'+', Table0, NULL, 'K', 2, (EPTR)Ignore, // German font
'+', Table0, NULL, 'Y', 2, (EPTR)Ignore, // Italian font
'+', Table0, NULL, '6', 2, (EPTR)Ignore, // Norwegian/Danish font
'+', Table0, NULL, 'E', 2, (EPTR)Ignore, // Norwegian/Danish font
'+', Table0, NULL, 'Z', 2, (EPTR)Ignore, // Spanish font
'+', Table0, NULL, '7', 2, (EPTR)Ignore, // Swedish font
'+', Table0, NULL, 'H', 2, (EPTR)Ignore, // Swedish font
'+', Table0, NULL, '=', 2, (EPTR)Ignore, // Swiss font
'*', Table0, NULL, 'A', 2, (EPTR)Ignore, // British font
'*', Table0, NULL, 'B', 2, (EPTR)Ignore, // ASCII font
'*', Table0, NULL, '0', 2, (EPTR)Ignore, // DEC special graphics font
'*', Table0, NULL, '<', 2, (EPTR)Ignore, // DEC supplemental font
'*', Table0, NULL, '4', 2, (EPTR)Ignore, // Dutch font
'*', Table0, NULL, '5', 2, (EPTR)Ignore, // Finnish font
'*', Table0, NULL, 'C', 2, (EPTR)Ignore, // Finnish font
'*', Table0, NULL, 'R', 2, (EPTR)Ignore, // French font
'*', Table0, NULL, 'Q', 2, (EPTR)Ignore, // French Canadian font
'*', Table0, NULL, 'K', 2, (EPTR)Ignore, // German font
'*', Table0, NULL, 'Y', 2, (EPTR)Ignore, // Italian font
'*', Table0, NULL, '6', 2, (EPTR)Ignore, // Norwegian/Danish font
'*', Table0, NULL, 'E', 2, (EPTR)Ignore, // Norwegian/Danish font
'*', Table0, NULL, 'Z', 2, (EPTR)Ignore, // Spanish font
'*', Table0, NULL, '7', 2, (EPTR)Ignore, // Swedish font
'*', Table0, NULL, 'H', 2, (EPTR)Ignore, // Swedish font
'*', Table0, NULL, '=', 2, (EPTR)Ignore, // Swiss font
'#', Table0, NULL, '3', 2, (EPTR)ScaleFont, // DECHDL (top half)
'#', Table0, NULL, '4', 2, (EPTR)ScaleFont, // DECHDL (bottom half)
'#', Table0, NULL, '5', 2, (EPTR)ScaleFont, // DECSWL
'#', Table0, NULL, '6', 2, (EPTR)ScaleFont, // DECDWL
'#', Table0, NULL, '8', 2, (EPTR)AlignmentTest, // DECALN
' ', Table0, NULL, 'F', 2, (EPTR)Ignore, // S7C1T
' ', Table0, NULL, 'G', 2, (EPTR)Ignore, // C8C1T
/* Multiple Character Sequence. */
'(', Table6, Term0, 'D', 0, (EPTR)Ignore, // SCS
'[', Table3, NULL, 'i', 0, (EPTR)PrinterController, // Print mode
'[', Table3, NULL, 'n', 0, (EPTR)RequestInformation, // DSR
'[', Table3, NULL, 'c', 0, (EPTR)RequestTerminal, // DA
'[', Table3, NULL, 'h', 0, (EPTR)SetSomething, // Terminal modes
'[', Table3, NULL, 'l', 0, (EPTR)SetSomething, // Terminal modes
'[', Table4, NULL, 'h', 0, (EPTR)Ignore,
'[', Table5, NULL, 'p', 0, (EPTR)Ignore, // DECSCL
'[', Table1, NULL, 'A', 0, (EPTR)MoveCursor, // CUU
'[', Table1, NULL, 'B', 0, (EPTR)MoveCursor, // CUD
'[', Table1, NULL, 'C', 0, (EPTR)MoveCursor, // CUF
'[', Table1, NULL, 'D', 0, (EPTR)MoveCursor, // CUB
'[', Table1, NULL, 'G', 0, (EPTR)MoveColumn,
'[', Table3, NULL, 'K', 0, (EPTR)EraseLine, // EL/DECSEL
'[', Table3, NULL, 'J', 0, (EPTR)EraseScreen, // ED/DECSED
'[', Table1, NULL, 'P', 0, (EPTR)EraseCharacters, // DCH
'[', Table1, NULL, 'X', 0, (EPTR)EraseCharacters, // ECH (sort of)
'[', Table1, NULL, '@', 0, (EPTR)InsertCharacters, // ICH
'[', Table1, NULL, 'L', 0, (EPTR)InsertLine, // IL
'[', Table1, NULL, 'M', 0, (EPTR)ClearLine, // DL
'[', Table1, NULL, 'g', 0, (EPTR)SetTabs, // TBC
'[', Table5, NULL, 'q', 0, (EPTR)Ignore, // DECSCA
'[', Table2, NULL, 'H', 0, (EPTR)SetAbsolutePosition, // CUP
'[', Table2, NULL, 'f', 0, (EPTR)SetTopPosition, // HVP
'[', Table2, NULL, 'm', 0, (EPTR)SetAttributes, // SGR
'[', Table2, NULL, 'y', 0, (EPTR)Ignore, // DECTST
'[', Table2, NULL, 'r', 0, (EPTR)SetRegion, // DECSTBM
'[', Table1, NULL, 'S', 0, (EPTR)ScrollUp,
'[', Table1, NULL, 'T', 0, (EPTR)ScrollDown,
'[', Table1, NULL, 'E', 0, (EPTR)MoveCursorDown,
'[', Table1, NULL, 'F', 0, (EPTR)MoveCursorUp
};
WORD NumCodes = sizeof(ANSICode) / sizeof(struct ControlCode);
/**********************************************************************/
struct SignalSemaphore ARexxQueueSemaphore;
struct List ARexxQueue;
BOOL ARexxRunning;
/**********************************************************************/
UWORD PenTable[16];
UBYTE TextAttributeTable[16];
WORD ForegroundPen,
BackgroundPen;
/**********************************************************************/
BOOL ChatMode;
ULONG SliderType;
/**********************************************************************/
ColourTable *NormalColourTable,
*BlinkColourTable,
*ANSIColourTable,
*EGAColourTable,
*DefaultColourTable,
*MonoColourTable;
/**********************************************************************/
UBYTE Language[80];